#include "Algebre/Solveur.hpp"

#include <iostream>

using namespace std;

int main()
{
  cout << "Nombre d'or :" << endl;

  Solveur phi(-1., -1., 1.);

  vector< double > sol;

  phi.resoud( sol );

  vector< double >::const_iterator Begin, End, It;

  Begin = sol.begin();
  End   = sol.end();

  for (It = Begin; It != End; It++)
    cout << *It << ' ';
  cout << endl;

  cout << "Troisième degré :" << endl;

  Solveur trois( -8./3., -10./3., 1./3., 1. );

  trois.resoud( sol );

  Begin = sol.begin();
  End   = sol.end();

  for (It = Begin; It != End; It++)
    cout << *It << ' ';
  cout << endl;

  cout << "4 solutions 1 :" << endl;

  Solveur q( 30., -19., -15., 3., 1. );

  q.resoud( sol );

  Begin = sol.begin();
  End   = sol.end();

  for (It = Begin; It != End; It++)
    cout << *It << ' ';
  cout << endl;

  cout << "4 solutions 2 :" << endl;

  Solveur tore( 189., -300., 130., -20., 1. );

  tore.resoud( sol );

  Begin = sol.begin();
  End   = sol.end();

  for (It = Begin; It != End; It++)
    cout << *It << ' ';
  cout << endl;

  return 0;
}
